{@ Context::addJsFile("./common/js/jquery.js", true, '', -100000) }
{@ Context::addJsFile("./common/js/js_app.js", true, '', -100000) }
{@ Context::addJsFile("./common/js/x.js", true, '', -100000) }
{@ Context::addJsFile("./common/js/common.js", true, '', -100000) }
{@ Context::addJsFile("./common/js/xml_handler.js", true, '', -100000) }
{@ Context::addJsFile("./common/js/xml_js_filter.js", true, '', -100000) }
<!--%import("js/mkin.js")-->
<!--%import("css/mkin.css")-->
<!--%import("filter/write_document.xml")-->
<div class="bd">
	<div class="hx h2">
		<h2><a href="{getUrl('','vid',$vid,'mid',$mid)}">{$module_info->browser_title}</a> &rsaquo; {$lang->cmd_write}</h2>
	</div>
	<form action="./" method="post" class="ff" onsubmit="return procFilter(this, write_document)">
	<input type="hidden" name="mid" value="{$mid}" />
	<input type="hidden" name="document_srl" value="{$document_srl}" />
	<ul>
		<!--@if($module_info->use_category == "Y")-->
			<li>
				<label for="nCategory">{$lang->category}</label>
				<select name="category" id="nCategory">
					<!--@foreach($categories as $val)-->	
					<option <!--@if(!$val->grant)-->disabled="disabled"<!--@endif--> value="{$val->category_srl}" <!--@if($val->grant&&$val->selected||$val->category_srl==$oDocument->get('category_srl'))-->selected=="selected"<!--@endif-->>
					{str_repeat("&nbsp;&nbsp;",$val->depth)} {$val->title} ({$val->document_count})
					</option>
					<!--@end-->
				</select>
			</li>
			<!--@end-->
			<li>
				<label for="nTitle">{$lang->title}</label>
				<input name="title" type="text" id="nTitle" />
			</li>
			<li>
				<label for="nText">{$lang->content}</label>
				<textarea name="content" cols="20" rows="8" id="nText" value="{$oDocument->getContentText()}"></textarea>
			</li>
			<li>
				<label for="nPoint" style="display:block">{$lang->give_point}</label>
				<!--@if($oDocument->isExists())-->
				{number_format($oDocument->get('point'))} {$point_name}
				<!--@else-->
				<input type="text" name="give_point"  id="nPoint" value="{$min_point}" style="width:100px; display:inline" /> {$point_name}
				<!--@end-->
				<p>{sprintf($lang->about_give_point, $min_point, $max_point)}</p></td>
			</li>
			<li>
				<label for="nTag">{$lang->tag}</label>
				<input name="tags" type="text" id="nTags" value="{htmlspecialchars($oDocument->get('tags'))}" />
			</li>
	</ul>
	<div class="bna">
		<button type="submit" class="bn dark">{$lang->cmd_registration}</button>
	</div>
</div>
